Custom Notification through Cloudhub Connector

 

MuleSoft provide Cloudhub connector to connect with Anypoint Platform from MuleSoft application. Using this we can also send custom notification through Cloudhub connector. So think if you have to send an email notification to group of users, where notification can be just FYI info or Warning or Actual error within the API on which you want the user to work on.

Let’s see how we can achieve the same in MuleSoft

Create Custom Alert in Anypoint

https://anypoint.mulesoft.com/cloudhub/#/console/home/alerts/

Custom Notification through Cloudhub Connector

 

Provide the details

  • Name of the Alert
  • Severity level – Critical, Info and Warning
  • Source – Application or Server level
  • Application type – Cloudhub Application
  • Applications – Application for which we want to generate the notification
  • Condition – Custom Application Notification
    • Priority – Any, Info, Warn and Error
  • Subject and Message – disabled for us
  • Recipients – Email id of recipient whom we want to send email

Custom Notification through Cloudhub Connector

 

Alert will look like below

Custom Notification through Cloudhub Connector

 

Let’s configure the connector in Mule application

Create a listener

Custom Notification through Cloudhub Connector

 

Add the Cloudhub connector create notification activity – please see how we can add the module

 

Click on adding Connector configuration

  • Username – Anypoint platform username
  • Password – Anypoint platform password
  • Environment id – this is the environment where the alert is created

We get the environment details from Anypoint platform; if name doesn’t work then change it with environment id.

 

Test the connection

 

Add the domain – it’s an application name in the environment

Set the message and priority

 

Run the application and test the endpoint – http://localhost:8081/cloudhub

 

Now we can see the notification in our email box

 

Sample application: cloudhub-services

 

  
Thank you for taking out time to read the above post. Hope you found it useful. In case of any questions, feel free to comment below. Also, if you are keen on knowing about a specific topic, happy to explore your recommendations as well.
 
For any latest updates or posts on our website, you can follow us on LinkedIn. Look forward to connecting with you there.


Share this:
Subscribe
Notify of
guest
4 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
Raj Chaudhary
Raj Chaudhary
4 years ago

Hi,

How can we read custom properties set in Create Notification in cloudhub alert?

Thanks
Raj

raju
raju
3 years ago

Hi,
How can we read custom properties set in Create Notification in cloudhub alert?
Thanks
Raj

Melvin Canafranca
Melvin Canafranca
1 year ago

After the MFA was required for the users, the basic authentication mechanism does not work anymore. A Connected App must be setup in order to auth and create custom notifications from the app.

pal
pal
1 year ago

Hi,
if possible can we add this for multiple applications as well how can we define here which application is getting critical